Skip to content

[ENG-274] Add landing page, market pages, and header toolbar to frontend#99

Draft
xbtmatt wants to merge 29 commits intomainfrom
ENG-274
Draft

[ENG-274] Add landing page, market pages, and header toolbar to frontend#99
xbtmatt wants to merge 29 commits intomainfrom
ENG-274

Conversation

@xbtmatt
Copy link
Copy Markdown
Contributor

@xbtmatt xbtmatt commented Apr 2, 2026

Summary

  • Adds proper encapsulation + population of environment variables for the frontend, for RPC url, Cluster, etc
  • Adds a landing page with Links to each active dropset market
  • Adds individual dropset market pages with a slug
  • Adds a header toolbar

Misc changes

  • Adds useSortedClasses rule for tailwindCSS that facilitates deterministic sorting of className classes
  • Adds pnpm lint:ts:fix:unsafe package.json lint variant for easier access to the unsafe write fixes command

@linear
Copy link
Copy Markdown

linear bot commented Apr 2, 2026

ENG-274

@xbtmatt xbtmatt changed the title Add landing page, market pages, and header toolbar to frontend [ENG-274] Add landing page, market pages, and header toolbar to frontend Apr 2, 2026
@xbtmatt xbtmatt force-pushed the ENG-274 branch 2 times, most recently from ce824a8 to cbe6701 Compare April 2, 2026 22:46
Base automatically changed from ENG-272 to main April 3, 2026 00:35
Copilot AI review requested due to automatic review settings April 3, 2026 00:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces initial frontend navigation and market browsing UX: a landing page that lists markets and links into per-market pages via slugged routes, plus shared layout elements (header, styling, and React Query setup).

Changes:

  • Added a markets landing page and per-market route (/market/[slug]) with slug resolution helpers.
  • Introduced React Query providers + hooks, and stubbed market query functions.
  • Added a global header and expanded global CSS styling for the new pages/components.

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
frontend/src/lib/slug.ts Adds prefix-map generation and slug resolution for market routes.
frontend/src/lib/rpc.ts Placeholder file intended for RPC/env encapsulation (currently empty).
frontend/src/lib/queries/fetch-market.ts Adds stubbed single-market fetch helper and type.
frontend/src/lib/queries/fetch-all-markets.ts Adds stubbed all-markets fetch helper and type.
frontend/src/lib/providers.tsx Introduces React Query provider (and devtools) wiring.
frontend/src/lib/hooks/use-market.ts Adds useMarket query hook.
frontend/src/lib/hooks/use-all-markets.ts Adds useAllMarkets query hook.
frontend/src/components/header.tsx Adds a sticky header with basic navigation links.
frontend/src/app/page.tsx Replaces the starter home page with a markets table + links to market pages.
frontend/src/app/market/[slug]/page.tsx Adds server route for a slugged market page + metadata generation.
frontend/src/app/market/[slug]/market-view.tsx Adds client-side market detail view using React Query.
frontend/src/app/layout.tsx Wraps app with Providers/Header and adds favicon metadata.
frontend/src/app/info/page.tsx Adds placeholder Info page.
frontend/src/app/repo/page.tsx Adds placeholder Repo page.
frontend/src/app/team/page.tsx Adds placeholder Team page.
frontend/src/app/globals.css Adds styling for header, page layout, and market table/detail components.
frontend/package.json Adjusts Biome lint script invocation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings April 3, 2026 02:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 43 out of 45 changed files in this pull request and generated 7 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings April 3, 2026 19:05
@xbtmatt xbtmatt changed the base branch from main to ENG-284 April 3, 2026 19:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 18 changed files in this pull request and generated 4 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 27 changed files in this pull request and generated 4 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 26 changed files in this pull request and generated 3 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 26 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 25 out of 27 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 25 out of 27 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 25 out of 27 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3 to +15
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import dynamic from "next/dynamic";

const ReactQueryDevtools = dynamic(
() =>
import("@tanstack/react-query-devtools").then(
(mod) => mod.ReactQueryDevtools,
),
{ ssr: false },
);

import { type ReactNode, useState } from "react";

Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a static import placed after the ReactQueryDevtools constant declaration. With Biome’s organizeImports assist enabled, this typically produces an “organize imports” diagnostic / autofix churn. Consider moving the react import up with the other imports (and letting Biome organize them) so pnpm lint stays clean.

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +14
export async function generateMetadata({ params }: Props): Promise<Metadata> {
const { slug } = await params;
const markets = await fetchAllMarkets();
const address =
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fetchAllMarkets() is called in generateMetadata and then again in MarketPage (below). Since this isn’t a fetch() request, Next won’t automatically dedupe it, so this can double the RPC work per request. Consider caching/memoizing the market list (e.g. via react’s cache()), or restructuring so the market list (or resolved address) is computed once and reused for both metadata and rendering.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants